package com.magilit.framelibrary.base;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.FrameLayout;

import com.magilit.framelibrary.R;


public abstract class FrameNormalActivity extends FrameBaseActivity {

    //主要显示的界面  容器
    private FrameLayout mContentLayout;
    //是否注册了EventBus

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    protected void initContentView() {
        setContentView(R.layout.activity_frame_base);
        mContentLayout = (FrameLayout) findViewById(R.id.rootlayout_baseactivity);
    }

    /**
     * 代替onCreate的入口类
     *
     * @param savedInstanceState
     */
    protected abstract void onBaseActivityCreated(Bundle savedInstanceState);

    /**
     * 设置Activity的中心内容
     *
     * @param layoutResID 资源Id
     */
    protected final void setMyContentView(int layoutResID) {
        if (mContentLayout != null) {
            LayoutInflater.from(this).inflate(layoutResID, mContentLayout, true);
        }
        autoInjectViewField();
    }




}
